import '../../util/http.dart';
import 'package:flutter/material.dart';




class Dictionary{

  static Map<String, String> type = {
    "carType": "car_type",
    "containerType": "container_type",
    "siteType": "site_type",
    "workshop": "workshop",
    "deliveryType":"delivery_task_type"
  };

  BuildContext? context;

  static Dictionary of(BuildContext? context){
    Dictionary dictionary = Dictionary();
    dictionary.context = context;
    return dictionary;
  }

  /// 获取数据字典
  Future<dynamic> listByTypes(types) async{
    return await ApiService.of(context).get('sys/dictionary/listByTypes/'+types);
  }
}